package com.spiro.common;

import java.io.IOException;
import java.util.Properties;

public class Configuration {
    private static Configuration ourInstance = new Configuration();

    public static Configuration getInstance() {
        return ourInstance;
    }

    private Configuration() {
    }

    private Properties properties = new Properties();

    public void load(String filename) throws IOException {
        properties.load(Thread.currentThread()
                .getContextClassLoader()
                .getResourceAsStream(filename));
    }

    public String getConf(String key) {
        return this.properties.getProperty(key);
    }

}
